<?php /* Smarty version Smarty-3.1.6, created on 2012-12-01 05:48:52
         compiled from "./admin/Tpl\item\index.html" */ ?>
<?php /*%%SmartyHeaderCode:206850b24a83239138-19618359%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '9debcaaaf1c4c887b60fd651c50bb9bf1818125d' => 
    array (
      0 => './admin/Tpl\\item\\index.html',
      1 => 1354230386,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '206850b24a83239138-19618359',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.6',
  'unifunc' => 'content_50b24a8343912',
  'variables' => 
  array (
    'class' => 0,
    'item' => 0,
    'items' => 0,
    'page' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_50b24a8343912')) {function content_50b24a8343912($_smarty_tpl) {?><link href="/assets/css/admin.css" rel="stylesheet" type="text/css"/>
<link href="/assets/css/dialog.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="/assets/js/calendar/calendar-blue.css"/>
<script type="text/javascript" src="/assets/js/calendar/calendar.js"></script>
<script type="text/javascript" src="/assets/js/jquery/plugins/jquery.imagePreview.js"></script>
<body>
<div class="pad-10">
  <form name="searchform" action="" method="get">
    <table width="100%" cellspacing="0" class="search-form">
      <tbody>
        <tr>
          <td><div class="explain-col"> 发布时间：
              <input type="text" name="time_start" id="time_start" class="date input-text" size="12" value="">
              <script language="javascript" type="text/javascript">                    Calendar.setup({
                        inputField     :    "time_start",
                        ifFormat       :    "%Y-%m-%d",
                        showsTime      :    'true',
                        timeFormat     :    "24"
                    });
                </script> -
              <input type="text" name="time_end" id="time_end" class="date input-text" size="12" value="">
              <script language="javascript" type="text/javascript">                    Calendar.setup({
                        inputField     :    "time_end",
                        ifFormat       :    "%Y-%m-%d",
                        showsTime      :    'true',
                        timeFormat     :    "24"
                    });
                </script> &nbsp;商品分类：
              <select name="cate_id">
                <option value="0">--请选择分类--</option>
                <?php  $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['item']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['class']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value){
$_smarty_tpl->tpl_vars['item']->_loop = true;
?>
                 <option <?php if (!isset($_smarty_tpl->tpl_vars['classId'])) $_smarty_tpl->tpl_vars['classId'] = new Smarty_Variable(null);if ($_smarty_tpl->tpl_vars['classId']->value = $_smarty_tpl->tpl_vars['item']->value['id']){?>selected<?php }?> value="<?php echo $_smarty_tpl->tpl_vars['item']->value['id'];?>
"><?php echo $_smarty_tpl->tpl_vars['item']->value['className'];?>
</option>
                <?php } ?>
              </select>
              &nbsp;
              <select name="is_index">
                <option value="-1">-首页显示-</option>
                <option value="1">是</option>
                <option value="0">否</option>
              </select>
              &nbsp;
              <select name="status">
                <option value="-1">-是否审核-</option>
                <option value="1">已审核</option>
                <option value="0">未审核</option>
              </select>
              &nbsp;关键字 :
              <input name="keyword" type="text" class="input-text" size="25" value="">
              <input type="hidden" name="m" value="item">
              <input type="submit" name="search" class="button" value="搜索">
            </div></td>
        </tr>
      </tbody>
    </table>
  </form>
  <form id="form1" action="?m=item&a=index" method="post">
  <div class="table-list">    
      <table width="100%" cellspacing="0">
        <thead>
          <tr class="first_tr">
            <th width="40">序号</th>
            <th width="15"><input type="checkbox" onChange="checkAll();" value="" id="check_box"></th>
            <th width="40">ID</th>
            <th>商品名称</th>
            <th width="60">分类</th>
            <th width="80"><a href="" class="blue ">更新时间</a></th>
            <th width="60"><a href="" class="blue ">价格(元)</a></th>
            <th width="40"><a href="" class="blue ">喜欢</a></th>
            <th width="40"><a href="" class="blue ">人气</a></th>
            <th width="30">排序</th>
            <th width="30">首页</th>
            <th width="30">审核</th>
            <th width="30">操作</th>
          </tr>
        </thead>
        <tbody>
        <?php  $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['item']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['items']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value){
$_smarty_tpl->tpl_vars['item']->_loop = true;
?>
        <tr>
          <td align="center"><?php echo $_smarty_tpl->tpl_vars['item']->value['id'];?>
</td>
          <td align="center"><input type="checkbox" class="check" value="<?php echo $_smarty_tpl->tpl_vars['item']->value['id'];?>
" name="id[]"></td>
          <td align="center"><a class="blue" href="/index.php?a=product&id=<?php echo $_smarty_tpl->tpl_vars['item']->value['id'];?>
" target="_blank"><?php echo $_smarty_tpl->tpl_vars['item']->value['id'];?>
</a></td>
          <td align="left"><a href="<?php echo $_smarty_tpl->tpl_vars['item']->value['item_link'];?>
" target="_blank"><?php echo $_smarty_tpl->tpl_vars['item']->value['title'];?>
</a></td>
          <td align="center"><b><?php echo $_smarty_tpl->tpl_vars['item']->value['className'];?>
</b></td>
          <td align="center">1970-01-01 08:00:00</td>
          <td align="center"><em style="color:red;"><?php echo $_smarty_tpl->tpl_vars['item']->value['price'];?>
</em></td>
          <td><input type="text" class="input-text-c input-text" value="0" size="4" name="likes_106" id="likes_106" ></td>
          <td align="center"><em style="color:green;"><?php echo $_smarty_tpl->tpl_vars['item']->value['click'];?>
</em></td>
          <td><input type="text" class="input-text-c input-text" value="<?php echo $_smarty_tpl->tpl_vars['item']->value['sort'];?>
" size="4" name="listorders[106]" id="listorders[106]" ></td>
          <td align="center" onclick="status(<?php echo $_smarty_tpl->tpl_vars['item']->value['id'];?>
,'is_index')" id="is_index_<?php echo $_smarty_tpl->tpl_vars['item']->value['id'];?>
"><img src="/assets/images/status_<?php echo $_smarty_tpl->tpl_vars['item']->value['is_index'];?>
.gif"></td>
          <td align="center" onclick="status(<?php echo $_smarty_tpl->tpl_vars['item']->value['id'];?>
,'status')" id="status_<?php echo $_smarty_tpl->tpl_vars['item']->value['id'];?>
"><img src="/assets/images/status_<?php echo $_smarty_tpl->tpl_vars['item']->value['status'];?>
.gif"></td>
          <td align="center"><a class="blue" href="/admin.php?m=item&a=edit&id=<?php echo $_smarty_tpl->tpl_vars['item']->value['id'];?>
">编辑</a></td>
        </tr>
        <?php } ?>
        </tbody>
        
      </table>
      <div class="btn">
        <label for="check_box" style="float:left;">全选/取消</label>
        <input type="submit" onClick="del()" class="button" name="dosubmit" value="删除" style="float:left;margin:0 10px 0 10px;">
        <input type="submit" class="button" name="dosubmit" value="排序">
        <input type="submit" class="button" name="dosubmit" value="更新">
        <div id="pages"> <?php echo $_smarty_tpl->tpl_vars['page']->value;?>
 </div>
      </div>
  </div>
  </form>
</div>
</body>

<script>
function checkAll(){
	$(".check").attr("checked",'checked');
}
function del(){
	$("#form1").attr("action","?m=item&a=del");
}
function status(id,type){
    $.get("/admin.php?a=status&m=item", { id: id, type: type }, function(jsondata){
		//alert(jsondata);
		$("#"+type+"_"+id+" img").attr('src', '/assets/images/status_'+jsondata+'.gif')
	}); 
}

</script> 
<script src="/assets/js/jquery.js"></script><?php }} ?>